﻿namespace Sidvall.IdentityManager.Data.Entity.Entities
{
    public partial class AspNetUsers : global::Sidvall.Data.DataRowBase, global::Sidvall.IdentityManager.Data.IAspNetUsers
    {
        #region Public Members

        #region AccessFailedCount

        private int _AccessFailedCount;
        public int AccessFailedCount
        { 
            get
            {
                return _AccessFailedCount;
            }
            set
            {
                _AccessFailedCount = value;
            }
        }

        #endregion
        #region Email

        private string _Email;
        public string Email
        { 
            get
            {
                return _Email;
            }
            set
            {
                _Email = value;
            }
        }

        #endregion
        #region EmailConfirmed

        private bool _EmailConfirmed;
        public bool EmailConfirmed
        { 
            get
            {
                return _EmailConfirmed;
            }
            set
            {
                _EmailConfirmed = value;
            }
        }

        #endregion
        #region Id

        private string _Id;
        public string Id
        { 
            get
            {
                return _Id;
            }
            set
            {
                _Id = value;
            }
        }

        #endregion
        #region LockoutEnabled

        private bool _LockoutEnabled;
        public bool LockoutEnabled
        { 
            get
            {
                return _LockoutEnabled;
            }
            set
            {
                _LockoutEnabled = value;
            }
        }

        #endregion
        #region LockoutEndDateUtc

        private System.Nullable<System.DateTime> _LockoutEndDateUtc;
        public System.Nullable<System.DateTime> LockoutEndDateUtc
        { 
            get
            {
                return _LockoutEndDateUtc;
            }
            set
            {
                _LockoutEndDateUtc = Sidvall.Business.ValidationManager.GetValidUniversalDateTime(value, System.DateTimeKind.Utc);
            }
        }

        #endregion
        #region PasswordHash

        private string _PasswordHash;
        public string PasswordHash
        { 
            get
            {
                return _PasswordHash;
            }
            set
            {
                _PasswordHash = value;
            }
        }

        #endregion
        #region PhoneNumber

        private string _PhoneNumber;
        public string PhoneNumber
        { 
            get
            {
                return _PhoneNumber;
            }
            set
            {
                _PhoneNumber = value;
            }
        }

        #endregion
        #region PhoneNumberConfirmed

        private bool _PhoneNumberConfirmed;
        public bool PhoneNumberConfirmed
        { 
            get
            {
                return _PhoneNumberConfirmed;
            }
            set
            {
                _PhoneNumberConfirmed = value;
            }
        }

        #endregion
        #region SecurityStamp

        private string _SecurityStamp;
        public string SecurityStamp
        { 
            get
            {
                return _SecurityStamp;
            }
            set
            {
                _SecurityStamp = value;
            }
        }

        #endregion
        #region TwoFactorEnabled

        private bool _TwoFactorEnabled;
        public bool TwoFactorEnabled
        { 
            get
            {
                return _TwoFactorEnabled;
            }
            set
            {
                _TwoFactorEnabled = value;
            }
        }

        #endregion
        #region UserName

        private string _UserName;
        public string UserName
        { 
            get
            {
                return _UserName;
            }
            set
            {
                _UserName = value;
            }
        }

        #endregion
        
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual System.Collections.Generic.ICollection<Sidvall.IdentityManager.Data.Entity.Entities.AspNetRoles> AspNetRoles { get; set; }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual System.Collections.Generic.ICollection<Sidvall.IdentityManager.Data.Entity.Entities.AspNetUserClaims> AspNetUserClaims { get; set; }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual System.Collections.Generic.ICollection<Sidvall.IdentityManager.Data.Entity.Entities.AspNetUserLogins> AspNetUserLogins { get; set; }
        
        #region DataRowContextStorageKey

        protected override string DataRowContextStorageKey
        {
            get
            {
                return global::Sidvall.IdentityManager.Data.Entity.SystemContext.Current.EntityFacade.AspNetUsersManager.GetKey(this);
            }
        }

        #endregion
        #region DataRowStateIsDirty

        protected override bool DataRowStateIsDirty
        {
            get
            {
                return global::Sidvall.IdentityManager.Data.Entity.SystemContext.Current.EntityFacade.AspNetUsersManager.DataRowStateIsDirty(this);
            }
        }

        #endregion

        #region IAspNetUsers Members

        int global::Sidvall.IdentityManager.Data.IAspNetUsers.AccessFailedCount
        {
            get
            {
                return this._AccessFailedCount;
            }
            set
            {
                this.AccessFailedCount = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.Email
        {
            get
            {
                return this._Email;
            }
            set
            {
                this.Email = value;
            }
        }
        bool global::Sidvall.IdentityManager.Data.IAspNetUsers.EmailConfirmed
        {
            get
            {
                return this._EmailConfirmed;
            }
            set
            {
                this.EmailConfirmed = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.Id = value;
            }
        }
        bool global::Sidvall.IdentityManager.Data.IAspNetUsers.LockoutEnabled
        {
            get
            {
                return this._LockoutEnabled;
            }
            set
            {
                this.LockoutEnabled = value;
            }
        }
        System.Nullable<System.DateTime> global::Sidvall.IdentityManager.Data.IAspNetUsers.LockoutEndDateUtc
        {
            get
            {
                return this._LockoutEndDateUtc;
            }
            set
            {
                this.LockoutEndDateUtc = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.PasswordHash
        {
            get
            {
                return this._PasswordHash;
            }
            set
            {
                this.PasswordHash = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.PhoneNumber
        {
            get
            {
                return this._PhoneNumber;
            }
            set
            {
                this.PhoneNumber = value;
            }
        }
        bool global::Sidvall.IdentityManager.Data.IAspNetUsers.PhoneNumberConfirmed
        {
            get
            {
                return this._PhoneNumberConfirmed;
            }
            set
            {
                this.PhoneNumberConfirmed = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.SecurityStamp
        {
            get
            {
                return this._SecurityStamp;
            }
            set
            {
                this.SecurityStamp = value;
            }
        }
        bool global::Sidvall.IdentityManager.Data.IAspNetUsers.TwoFactorEnabled
        {
            get
            {
                return this._TwoFactorEnabled;
            }
            set
            {
                this.TwoFactorEnabled = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.UserName
        {
            get
            {
                return this._UserName;
            }
            set
            {
                this.UserName = value;
            }
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        System.Collections.Generic.IEnumerable<IAspNetRoles> global::Sidvall.IdentityManager.Data.IAspNetUsers.AspNetRoles
        {
            get
            {
                return this.AspNetRoles;
            }
        }
        void global::Sidvall.IdentityManager.Data.IAspNetUsers.SetAspNetRoles(Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetRoles> items)
        {
            this.AspNetRoles = items as AspNetRolesCollection;
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        System.Collections.Generic.IEnumerable<IAspNetUserClaims> global::Sidvall.IdentityManager.Data.IAspNetUsers.AspNetUserClaims
        {
            get
            {
                return this.AspNetUserClaims;
            }
        }
        void global::Sidvall.IdentityManager.Data.IAspNetUsers.SetAspNetUserClaims(Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserClaims> items)
        {
            this.AspNetUserClaims = items as AspNetUserClaimsCollection;
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        System.Collections.Generic.IEnumerable<IAspNetUserLogins> global::Sidvall.IdentityManager.Data.IAspNetUsers.AspNetUserLogins
        {
            get
            {
                return this.AspNetUserLogins;
            }
        }
        void global::Sidvall.IdentityManager.Data.IAspNetUsers.SetAspNetUserLogins(Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserLogins> items)
        {
            this.AspNetUserLogins = items as AspNetUserLoginsCollection;
        }

        #endregion

        #endregion
        #region Constructors

        public AspNetUsers() : this(false, null, null)
        {
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public AspNetUsers(bool initializeChildren, Sidvall.Data.IDataRowContextProvider context, Sidvall.Data.DataRowState? dataRowState)
        {
            if ((context != null) || (dataRowState != null))
                SetDataRowContext(context, dataRowState);
            if (initializeChildren)
            {
                this.AspNetRoles = new System.Collections.Generic.List<AspNetRoles>();
                this.AspNetUserClaims = new System.Collections.Generic.List<AspNetUserClaims>();
                this.AspNetUserLogins = new System.Collections.Generic.List<AspNetUserLogins>();
            }
        }

        #endregion
    }
}